﻿#include "FToolButton.h"
#include "../Base/FTheme.h"


FToolButton::FToolButton(QWidget *parent)
    : QToolButton{parent}
{
    QString qss = QString(R"(
FToolButton {
    background: transparent;
    border-radius: 3px;
    padding: 3px 3px;
}

FToolButton:hover {
    background: %1;
}

FToolButton:pressed {
    background: %2;
}

FToolButton:checked {
    background: %3;
    color: #007aff;
    border: 1px solid %4;
}
)").arg(FColors::getBaseColor(FColors::Default).name(QColor::HexArgb),
        FColors::getHoverColor(FColors::Default).name(QColor::HexArgb),
        FColors::getHoverColor(FColors::Default).name(QColor::HexArgb),
        FColors::getActiveColor(FColors::Default).name(QColor::HexArgb));

    setStyleSheet(qss);
}
